Document, or page, layout analysis is a document processing technique used to determine the physical and logical structures of a document in terms of the geometric, spatial and functional relationships of its document components, and in particular, its text document components. Its typical purpose is to automatically transform document structures from a nonelectronic medium, like paper, into an electronic medium. One particular application for document processing techniques is for identifying a particular sample document, that is digitized, as one of a number of documents. This particular feature is most applicable for document sorting.
In order to compare and identify sample documents to one of a set of original documents, some techniques compare the overall features of the text within a sample document to the features exhibited by the original documents in the set of original documents. In order to perform the comparison, the sample document must be presented in an orientation that is as close as possible to the orientation of the original document, one of which involves de-skewing the digitized sample document. Another involves comparing similar machine printed text in the sample document and the original document. In this case, both the sample document and the original document can be compared to each other with text that is horizontally oriented, for example.
Prior art techniques exist for determining the global skew angle of a sample document. Text within a document when transferred to digitized form may be skewed in its alignment with the page outline of the document. This skewing may occur for many reasons, e.g., an angled presentation of the document in the scanner, a document that contains copied text that is skewed within the document, etc.
Segmentation of handwritten text from the machine printed text in a sample document may be necessary to determine the global skew angle of the machine printed text in the sample document. The global skew angle can be calculated by subtracting out the handwritten text from the machine printed text in the sample document. In this way, the global skew angle of the sample document can be determined from the remaining machine printed text.
However, when a document contains a mixture of machine printed text and handwritten text, the prior art techniques for determining a global skew angle of a document can be unreliable, especially if the handwritten text dominates within the document. Handwritten text may occur in the form of annotations on an original document. For example, on a form, questions are presented in machine printed text; however, answers to the text are presented in handwritten annotations.
Furthermore, prior art techniques for segmenting machine printed text from handwritten text for comparing sample documents to original documents and for determining a global skew angle of machine printed text can also be unreliable. One prior art technique involves the identification of machine written text within a sample document using morphological operations. The handwritten text is obtained by subtracting out the machine written text. However, this morphological technique can only work within a certain size range of the machine text for identifying the machine text. Additionally, with the subtraction procedure, if graphics were present within the original document, the handwritten text would be mixed with the graphics. As such, the handwritten text would still not be identified. Also, the morphological technique is deficient in determining local skew angles for particular lines of text.
Therefore, prior art methods of segmentation were unable to completely perform segmentation of handwritten text and machine printed text, especially if the sample document contained graphic information. Moreover, prior art techniques indirectly identified handwritten information in a sample document and therefore suffered from imprecise delineation between machine printed text, handwritten text, and graphics.